from django.db import models
from users.models import User
from utils.models import BaseModel


class OAuthQQUser(BaseModel):  # 关联两种写法 一种app名字.模型名字，一种是导包直接写模型名
    """第三方登录模型类"""
    user = models.ForeignKey('users.User', on_delete=models.CASCADE, verbose_name="关联的美多用户")
    open_id = models.CharField(max_length=64, verbose_name="openid", db_index=True)

    class Meta:
        db_table = "tb_oauth_qq"
        verbose_name = 'QQ登录用户数据'
        verbose_name_plural = verbose_name
